package com.city.repository.auth;

import com.city.domain.auth.PubAuth;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface PubAuthRepository extends JpaRepository<PubAuth,Integer> {

    PubAuth findByUserId(int id);


    @Query(value =  "SELECT pub_auth.value FROM pub_auth " +
                    "WHERE user_id = ?1", nativeQuery = true)
    String findValueByUserId(String userId);
}
